package me.realirea.config;

import me.pleens.awals.annotation.lifecycle.Load;
import me.pleens.awals.api.config.ConfigManager;
import me.pleens.awals.api.config.Configuration;
import org.jetbrains.annotations.NotNull;

import javax.inject.Singleton;
import java.util.List;

/**
 * 墓碑配置
 */
@Singleton
public class TombstoneConfig {

    private List<String> enableWorld;

    @Load
    private void setup(ConfigManager configManager) {
        Configuration defaultConfig = configManager.getDefaultConfig();
        enableWorld = defaultConfig.getStringList("enable-world");
    }

    public boolean containsEnableWorld(@NotNull String worldName) {
        return enableWorld.contains(worldName);
    }

    @NotNull
    public List<String> getEnableWorld() {
        return enableWorld;
    }

    public void setEnableWorld(@NotNull List<String> enableWorld) {
        this.enableWorld = enableWorld;
    }
}
